import Register from "@/views/Register";
import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import echarts from './views/charts/echarts.vue'
//org
import department from "./views/view/org/department";
import employee from "./views/view/org/employee";
import shop from "@/views/view/org/shop";
//产品
import Car from "@/views/view/car/Car";
import CarType from "@/views/view/car/CarType";
//系统
import config from "./views/view/sys/config";
import dictionary from "./views/view/sys/dictionary";
import dictionaryitem from "./views/view/sys/dictionaryitem";
//线索
import clue from "./views/view/market/clue";
import clue_activity from "./views/view/market/clue_activity";
import clue_remark from "./views/view/market/clue_remark";
//

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/settlement',
        component:Register ,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '首页',
        iconCls: 'fa fa-bar-chart',
        leaf: true,
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/department', component: department, name: '部门管理'},
            { path: '/employee', component: employee, name: '员工管理' },
            { path: '/shop', component: shop, name: '店铺管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '车辆管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/car', component: Car, name: '车辆管理管理'},
            { path: '/carType', component: CarType, name: '车辆分类'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/config', component: config, name: '系统配置' },
            { path: '/dictionary', component: dictionary, name: '数字字典' },
            { path: '/dictionaryitem', component: dictionaryitem, name: '数字字典明细' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '线索管理',
        iconCls: 'fa fa-address-card',
        children: [
            { path: '/clue', component: clue, name: '线索' },
            { path: '/clueactivity', component: clue_activity, name: '线索关联活动活动' },
            { path: '/clueremark', component: clue_remark, name: '线索备注' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;